package com.lt.bookkeeping.Utils;

import java.util.Random;

/**
 * @author LiuTong
 */
public class StringUtils{
    public static boolean isEmptyOrNull(String str){
        if(str == null || "".equals(str)){
            return true;
        }
        return false;
    }

    public static String getRandomString(String res){
        Random ra = new Random(System.currentTimeMillis());
        int maxLength = res.length()/5;
        int start = ra.nextInt(maxLength-10);
        int index = ra.nextInt(maxLength)%10+1;
        return res.substring(start,start+index);
    }

}
